﻿package core.ui.dialogs
{
    import core.ui.controls.*;
    import flash.events.*;

    public class OpenImageFromDialog extends Dialog
    {
        var tbn:TextInput;
        var aslayer:Boolean;

        public function OpenImageFromDialog(param1:Tuyitu, param2:Boolean)
        {
            super(param1, "rm_open_from_url", 240, 140, false);
            this.aslayer = param2;
            var _loc_3:* = new Literal("rm_url");
            _loc_3.x = 10;
            _loc_3.y = 30;
            addChild(_loc_3);
            this.tbn = new TextInput(200, 800, "http://");
            this.tbn.x = 12;
            this.tbn.y = 47;
            addChild(this.tbn);
            this.tbn.t.setSelection(0, this.tbn.t.length);
            stage.focus = this.tbn.t;
            return;
        }// end function

        override public function OKClick(event:MouseEvent) : void
        {
            if (this.tbn.text != "" && this.tbn.text != "http://")
            {
                new OpenImageDialog(ed, this.tbn.text, "", false, this.aslayer);
            }
            Close();
            return;
        }// end function

        override public function CloseClick(event:MouseEvent) : void
        {
            Close();
            ed.CheckToShowSplash();
            return;
        }// end function

    }
}
